package com.yx.pc.api.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.yx.common.utils.R;
import com.yx.modules.api.entity.TbUser;

import java.util.List;
import java.util.Map;

/**
 * Created by wuye on 2017/11/24.
 */
public interface PcTbUserService extends IService<TbUser> {

    TbUser queryByMobile(String mobile);

    void deleteBatch(Long[] userIds);

    TbUser foundById(Long userId);

    /**
     * 用户登录
     *
     * @param mobile   手机号
     * @param password 密码
     * @return 返回用户ID
     */
    long login(String mobile, String password);

    void save(String mobile, String password);

    void update(TbUser tbyser);

    TbUser queryByUid(String uid);

    Page<TbUser> queryPageList(Page<TbUser> pageUtil, Map<String, Object> map);

    /**
     * 查询用户列表
     */
    List<TbUser> queryList(Map<String, Object> map);

    TbUser queryWBBangd(String wbtoken, String wbopenid);

    TbUser queryQQBangd(String qqtoken, String qqopenid);

    R updateUser(TbUser user, TbUser user1);

    R rewardBook(TbUser user, int bookid, int actualMoney);

    TbUser findByAuthor(String userId);
}

